package trading.ctm.yunjing.module.message.adapter

import android.content.Intent
import android.view.View
import android.widget.TextView
import cc.vv.lkbasecomponent.base.ui.adapter.LKBaseSingleAdapter
import cc.vv.lkbasecomponent.base.ui.adapter.viewholder.LKBaseViewHolder
import trading.ctm.yunjing.R
import trading.ctm.yunjing.module.WebActivity

class MessageAuctionAdapter : LKBaseSingleAdapter<String, LKBaseViewHolder>{

    constructor(resId: Int, data: List<String>):super(resId, data){

    }

    override fun convert(helper: LKBaseViewHolder?, item: String?) {
        super.convert(helper, item)
        helper!!.getView<TextView>(R.id.tv_message_check).setOnClickListener {
            mContext.startActivity(Intent(mContext, WebActivity::class.java))
        }
        if(0 == helper.adapterPosition){
            helper!!.getView<View>(R.id.view_message_view).visibility = View.GONE
        }else{
            helper!!.getView<View>(R.id.view_message_view).visibility = View.VISIBLE
        }
    }
}
